//Kappy; Variables program
//Variables.cpp : Showcases different types of variables and how they're used.

#include <iostream>
#include <string>

using namespace std;

int add(int a, int b)
{
	return a + b; //return is a command (not the keyboard key)
}

void main()
{
	
	int val = add(2,4);
	cout << val << endl;

	int x = 2;
	double y = 3.14;  //more precise (use this by default)
	float z = 3.14f;  //less precise
	char a = 99;      //ascii codes ( a == 99 )
	char b = 'R';     // a single character
	string c = "Hello "; 
	string d = "World!";
	string f = c+d;
	bool e; 


	cout << "y = " << y << endl;
	cout << "z = " << z << endl;
	cout << "a = " << a << endl;
	cout << "b = " << b << endl;
	cout << "(int)a = " << (int)a << endl;
	cout << "a + b = " << a + b << endl;
	cout << "c + d = " << c + d << endl;
	cout << "f = " << f << endl;

	cout << endl << endl;

	if(z == 3.14)
	{
		cout << "Yay!" << endl;
	}
	else if(y == 3.14)
	{
		cout << "What?" << endl;
	}

	system("PAUSE");
}